class Tween extends egret.Tween { }
class WanFa extends eui.Component {

    constructor() {
        super();
        super.createChildren();//请务必调用此方法 ---白鹭如是说
        this.skinName = "WanFaSkin";
        this.name = "WanFaSkin";
        this.Init();
    }

    private Title: eui.Label;
    private HowToPlay: eui.Label;
    private jixuBtn:eui.Image;

    public Init(): void {
        this.Title.visible = true;
        this.HowToPlay.visible = true;
        this.jixuBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.RemoveThisIns,this);
        this.addEventListener(egret.Event.REMOVED,()=>this.jixuBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.RemoveThisIns,this),this)
    }

    public SetHowToPlay(word: string): void {
        this.HowToPlay.text = word;
    }

    public RemoveThisIns(): void {
        Tween.get(this).to({ "alpha": 0 }, 1000).call(() => this.stage.removeChild(this));

    }
}